import request from '@/utils/request'

// 获取所有商品列表
export const getShops = () => {
  return request({
    method: 'GET',
    url: '/shops/getShops'
  })
}

// 获取购物车列表
export const getShopCarList = id => {
  return request({
    method: 'GET',
    url: '/shopcar/getShopCarById',
    params: id
  })
}

// 修改购物车列表
export const changeShopCarList = id => {
  return request({
    method: 'POST',
    url: '/shopcar/editShopCar',
    id
  })
}

// 删除购物车列表
export const deleteShopCarList = id => {
  return request({
    method: 'DELETE',
    url: '/shopcar/delShopCar',
    params: id
  })
}

//  添加已购买商品
export const addBuyList = data => {
  return request({
    method: 'POST',
    url: '/buylist/addBuyList',
    data
  })
}
